home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 010 / missle.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1984-05-31  |  4.5 KB  |  178 lines

  1. 1000  FOR I = 1 TO 10
  2. 1010  SOUND 1200,3
  3. 1020  FOR J = 1 TO 150 : NEXT J
  4. 1030  NEXT I
  5. 1040  FOR I = 1 TO 2
  6. 1050  FOR FREQ = 500 TO 1500 STEP 10
  7. 1060  SOUND FREQ, 0.01*18.2
  8. 1070  NEXT FREQ
  9. 1080  NEXT I
  10. 1090  CLS:NEWRATE = 0
  11. 1100  PRINT
  12. 1110  PRINT
  13. 1120  PRINT "          W E L C O M E   T O  M I S S I L E  B L A S T
  14. 1130  PRINT
  15. 1140  PRINT
  16. 1150  PRINT
  17. 1160  PRINT " Missiles Blast is a ground to air missile game written for the"
  18. 1170  PRINT " IBM Personal Computer with a monochrome display only."
  19. 1180  PRINT " The object of the game is to destroy the alien spaceships"
  20. 1190  PRINT " as they fly over your missile launcher."
  21. 1200  PRINT " You will be given 25 missiles to destroy as many spaceships"
  22. 1210  PRINT " as you can.
  23. 1220  REM Stop program until key is pressed.
  24. 1230  LOCATE 23,1
  25. 1240  PRINT "Press  c  to continue"
  26. 1250  C$ = INKEY$ : IF C$ ="" THEN 1250
  27. 1260  CLS
  28. 1270  PRINT
  29. 1280  PRINT
  30. 1290  PRINT
  31. 1300  PRINT
  32. 1310  PRINT
  33. 1320  PRINT
  34. 1330  PRINT " The maximum score possible is 2500 points. You will be "
  35. 1340  REM This is a ground to air missile game named ALBLAST.
  36. 1350  PRINT " awarded 100 points for each spaceship you destroy."
  37. 1360  PRINT " Your score and rating will be displayed at the end of the"
  38. 1370  PRINT " of the game. The highest possible rating is UNIVERSE CLASS"
  39. 1380  PRINT " star warrior.
  40. 1390  PRINT " Missiles can be fired from the missile launcher by pressing"
  41. 1400  PRINT " the space bar.
  42. 1410  PRINT SPC(80)
  43. 1420  PRINT " Only one missile can be fired at a time. Another missile "
  44. 1430  PRINT" cannot be launched unless the previous missile is off the screen"
  45. 1440  REM The object of the game is to destroy the alien spaceship.
  46. 1450  REM Stop program until key is pressed
  47. 1460  LOCATE 23,1
  48. 1470  PRINT "Press r to start game"
  49. 1480  R$ = INKEY$ : IF R$ ="" THEN 1480
  50. 1490  REM flying over head.
  51. 1500  REM You can destroy the spaceship with skill and accuracy by
  52. 1510  REM firing your missiles at the right time.
  53. 1520  REM Missiles are fired by pressing the space bar.
  54. 1530  REM This program was written by Albert W. Brown Jr.
  55. 1540  REM 3157 Everdale Drive San Jose California 95148 (408)274-4271
  56. 1550  KEY OFF
  57. 1560  CLS
  58. 1570  REM Design missile,missile launcher,spaceship,explosion.
  59. 1580  MISCO = 25
  60. 1590  BULL$ = CHR$(33)
  61. 1600  EXP1$ = SPACE$(34)+ CHR$(195) +SPACE$(5)+CHR$(233)+SPACE$(5)+CHR$(180)
  62. 1610  ML$ = CHR$(201)+CHR$(202)+CHR$(187)
  63. 1620  SS$ = CHR$(32)+CHR$(195)+CHR$(233) +CHR$(180)+CHR$(32)
  64. 1630  REM Locate missile launcher.
  65. 1640  A$ = CHR$(192)+CHR$(33)+CHR$(217)
  66. 1650  FOR I = 50 TO 75 STEP 6
  67. 1660  LOCATE 23,I
  68. 1670  PRINT A$
  69. 1680  NEXT I
  70. 1690  LOCATE 25,38
  71. 1700  PRINT ML$
  72. 1710  MIS = 23:SIL = 39
  73. 1720  C = 1
  74. 1730  FLAG = 0
  75. 1740  REM Check and see if spaceship is off of screen.
  76. 1750  FLAG = 0 : R = 1
  77. 1760  IF C = 80 -5 THEN R = R + 5 : C =1
  78. 1770  C = C+ 1
  79. 1780  REM Display spaceship
  80. 1790  IF R = 26 GOTO 1840
  81. 1800  LOCATE R,C
  82. 1810  PRINT SS$;
  83. 1820  LOCATE R,75
  84. 1830  PRINT SPC(6)
  85. 1840  IF R =26 THEN :CLS : GOTO 1690
  86. 1850  IF FLAG = 1 THEN GOTO 1950
  87. 1860  REM Check and see if a missile has been launched.
  88. 1870  K$ = INKEY$
  89. 1880  IF K$ <> " " THEN GOTO 1760
  90. 1890  MISCO = MISCO - 1
  91. 1900  IF MISCO =-1  THEN GOTO 2330
  92. 1910  GOSUB 2640
  93. 1920  SOUND 300,1
  94. 1930  FLAG = 1
  95. 1940  REM Fire missile at spaceship
  96. 1950  LOCATE MIS,SIL
  97. 1960  BULBLK =MIS+1
  98. 1970  PRINT BULL$
  99. 1980  SOUND 3000,0.1
  100. 1990  REM Blank out previous image of missile.
  101. 2000  LOCATE BULBLK,SIL
  102. 2010  PRINT SPC(1)
  103. 2020  LOCATE 1,39
  104. 2030  PRINT SPC(1)
  105. 2040  MIS = MIS -1
  106. 2050  REM Check and see if spaceship has been hit.
  107. 2060  IF MIS = 0 THEN MIS =22 : FLAG = 0 : GOTO 1760
  108. 2070  IF MIS=R+1 AND C >=31 AND C<=38 THEN GOTO 2110
  109. 2080  REM If spaceship has been hit record score and reset.
  110. 2090  IF FLAG = 1 GOTO 1760
  111. 2100  GOTO 1720
  112. 2110  CLS
  113. 2120  I = 3
  114. 2130  FOR I = 1 TO I + 2
  115. 2140  LOCATE MIS , SIL
  116. 2150  REM Display explosion.
  117. 2160  COLOR 15
  118. 2170  PRINT EXP1$;
  119. 2180  COLOR 7
  120. 2190  NEXT
  121. 2200  CLS
  122. 2210  SCORE = SCORE + 100
  123. 2220  LOCATE 25,1
  124. 2230  REM Print score.
  125. 2240  PRINT "Your score is now "SCORE" points "
  126. 2250  SOUND 50,10 : SOUND 40,6
  127. 2260  PLAY "t45;o3;l32;dgb"
  128. 2270  PLAY "o4;d
  129. 2280  PLAY "p30"
  130. 2290  PLAY "o3;b
  131. 2300  PLAY "o4;l8;d
  132. 2310  REM Start all over .
  133. 2320  GOTO 1630
  134. 2330  MISCO = 0
  135. 2340  IF SCORE < 600 GOTO 2390
  136. 2350  IF SCORE >= 600 AND SCORE < 1200 GOTO 2400
  137. 2360  IF SCORE >= 1200 AND SCORE  < 1800 GOTO 2410
  138. 2370  IF SCORE >= 1800 AND SCORE < 2500 GOTO 2420
  139. 2380  IF SCORE = 2500 GOTO 2430
  140. 2390  CLA$ = "Novice Class " :RATE = 1: GOTO  2440
  141. 2400  CLA$ = "Amateur Class" :RATE = 2: GOTO 2440
  142. 2410  CLA$ = "World Class" :RATE = 3:GOTO 2440
  143. 2420  CLA$ = "Galaxy Class":RATE = 4: GOTO 2440
  144. 2430  CLA$ = "Universe Class" :RATE =5 :GOTO 2440
  145. 2440  STAW$ = " star warrior"
  146. 2450  LOCATE 12,35
  147. 2460  COLOR 31
  148. 2470  PRINT "GAME OVER"
  149. 2480  COLOR 7
  150. 2490  LOCATE 14,20
  151. 2500  PRINT "Your score for this game is"SCORE" points."
  152. 2510  LOCATE 16,20
  153. 2520  PRINT "This score qualifies you as a:"
  154. 2530  LOCATE 18,20
  155. 2540  PRINT CLA$ + STAW$
  156. 2550  IF RATE > NEWRATE THEN GOTO 2560 ELSE 2570
  157. 2560  NEWRATE = RATE
  158. 2570  LOCATE 21,12
  159. 2580  LOCATE 22,40
  160. 2590  PRINT "                                      "
  161. 2600  PRINT "        Print S to start another invasion or T to terminate."
  162. 2610  X$ = INPUT$(1)
  163. 2620  IF X$ ="T" OR X$="t" THEN 2670
  164. 2630  RUN 1550
  165. 2640  LOCATE 25,45
  166. 2650  PRINT "You now have "MISCO" missiles left." ;
  167. 2660  RETURN
  168. 2670  LOCATE 23,20
  169. 2680  PRINT "You have defended your missile launcher again.
  170. 2690  LOCATE 25,1
  171. 2700  PRINT SPC(79)
  172. 2710  LOCATE 24,1
  173. 2720  PRINT "                   Your highest rating was: "NEWRATE"            "
  174. 2730  LOCATE 25,1
  175. 2740  PRINT" 1 = Novice: 2= Amateur : 3= World : 4= Galaxy : 5= Universe "
  176. 2750  FOR DELAY = 1 TO 500 : NEXT DELAY
  177. 2760  CHAIN"MENU",1000
  178.